<?php
//退款申请回调扩展点
$param = file_get_contents('php://input');
file_put_contents('refund_callback_notify.json', $param);

$param = json_decode($param, true);

if (!empty($param['msg'])) {

    $msg = $param['msg'];
    $msg = json_decode($msg, true);
    // var_dump($msg);
    $out_refund_no = 'TK' . time() . uniqid();
    echo json_encode([
        'err_no' => 0,
        'err_tips' => 'success',
        "data" => [
            "out_refund_no" => $out_refund_no,
            "order_entry_schema" => [
                "path" => "ext://microapp-trade-plugin/refund-detail"//退款详情路径
            ],
            // "notify_url"=>"//
        ]

    ]);


    // var_dump($msg['goods'][0]['goods_id']);
    // exit;

} else {
    //
    echo json_encode([
        'err_no' => 1,
        'err_tips' => 'success',

    ]);
}
exit;
